Skip to content

BaseStatelessReplayLastSubjectAsync class

Defined in

Namespace: ReactiveUI.Extensions.Async.Subjects Assembly: ReactiveUI.Extensions.dll Full name: ReactiveUI.Extensions.Async.Subjects.BaseStatelessReplayLastSubjectAsync<T> Modifiers: public abstract

Summary

View source

        Provides a base class for stateless, asynchronous subjects that replay the last value to new subscribers and support
        resuming after errors or completion. Designed for scenarios where observers may join at any time and should receive
        the most recent value, if available.
        

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481

Class hierarchy
classDiagram
class BaseStatelessReplayLastSubjectAsync~T~
class ObservableAsync~T~
ObservableAsync~T~ <|-- BaseStatelessReplayLastSubjectAsync~T~
class ISubjectAsync~T~ {
    <>
}
ISubjectAsync~T~ <|.. BaseStatelessReplayLastSubjectAsync~T~
class IObserverAsync~T~ {
    <>
}
IObserverAsync~T~ <|.. BaseStatelessReplayLastSubjectAsync~T~
class IAsyncDisposable {
    <>
}
IAsyncDisposable <|.. BaseStatelessReplayLastSubjectAsync~T~
class IObservableAsync~T~ {
    <>
}
IObservableAsync~T~ <|.. BaseStatelessReplayLastSubjectAsync~T~

Inherits from: ObservableAsync

Implements: ISubjectAsync, IObserverAsync, IAsyncDisposable, IObservableAsync

Remarks

This abstract class implements asynchronous observer and observable patterns, allowing derived classes to define custom notification, error handling, and completion behaviors. It manages observer subscriptions and ensures that the most recent value (if any) is replayed to new subscribers. Thread safety is provided for concurrent access and notification. Typical use cases include event streaming, stateful data flows, or scenarios where late subscribers should receive the latest state.

Constructors

NameSummary
.ctorProvides a base class for stateless, asynchronous subjects that replay the last value to new subscribers and support resuming after errors or completion. Designed for scenarios where...

Methods

NameSummary
OnNextAsyncAsynchronously notifies all registered observers of a new value.
OnErrorResumeAsyncHandles an error by notifying all observers asynchronously and allows the operation to resume without propagating the exception.
OnCompletedAsyncNotifies all observers that the asynchronous operation has completed and performs necessary cleanup.
DisposeAsyncAsynchronously releases the unmanaged resources used by the object.
SubscribeAsyncCoreSubscribes the specified asynchronous observer to receive notifications from the observable sequence.
OnNextAsyncCoreAsynchronously notifies the specified observers of a new value.
OnErrorResumeAsyncCoreHandles an error by resuming asynchronous observation for the specified observers.
OnCompletedAsyncCoreInvoked to asynchronously notify all observers that the sequence has completed, providing the final result.
Inherited members